package com.king.designpatterns.设计模式对比.创造型模式对比.抽象工厂模式;

/**
 * @author king
 * @date 2021-06-16 17:16
 */
public class Client {
    public static void main(String[] args) {
        HeroFactory adultFactory = new AdultHeroFactory();
        ISuperMan adultFactorySuperMan = adultFactory.createSuperMan();
        ISpiderMan adultFactorySpiderMan = adultFactory.createSpiderMan();
        adultFactorySuperMan.specicalTalent();
        adultFactorySpiderMan.launchSilk();
        System.out.println("-----------------------------");
        HeroFactory childFactory = new ChildHeroFactory();
        ISuperMan childFactorySuperMan = childFactory.createSuperMan();
        ISpiderMan childFactorySpiderMan = childFactory.createSpiderMan();
        childFactorySuperMan.specicalTalent();
        childFactorySpiderMan.launchSilk();
    }
}
